const suggestions = document.querySelector(".suggestions")

document.querySelector(".search-field").addEventListener("keyup",(evet)=>{
    
    let text = evet.target.value
    if(!text.length){    
        suggestions.innerHTML = ''
        suggestions.classList.remove("active")
    }else{
        suggestions.innerHTML = ''

        suggestions.classList.add("active")
        let li = document.createElement("li")
        let b = document.createElement("b")
        b.textContent = text
        li.appendChild(b)
        suggestions.appendChild(li)

        li = document.createElement('li')
        b = document.createElement('b')
        b.textContent = text
        li.innerHTML = 'Veritatis et '+ b.outerHTML
        suggestions.appendChild(li)

        li = document.createElement('li')
        b = document.createElement('b')
        b.textContent = text
        li.innerHTML = 'ut aliquid ex '+ b.outerHTML + ' vero eos'
        suggestions.appendChild(li)
    }



})